/**
 * Copyright 2016 Qiyi Inc. All rights reserved.
 *
 * @file:   StatisticSty2.Action.js
 * @path:   js-src/StatisticSty2/
 * @desc:   Action静态对象，声明对象以及绑定事件、对外接口等
 * @author: zhang@qiyi.com
 * @date:   2016-03-28
 */
qui(
    function(require, exports, module) {

        StatisticSty2.Action = (function() {

            //表格
            var statisticSty2Grid = null;

            var getStatisticSty2Grid = function (options) {
                if (!statisticSty2Grid) {
                    statisticSty2Grid = new StatisticSty2.Grid($.extend(true,
                    {'$container': $('#StatisticSty2ListContainer'), $hiddenGrid: $("#hiddenGrid"), type:0}, options))
                }

                return statisticSty2Grid;
            }

            var statisticSty2GridRun = function(options) {
                statisticSty2Grid = getStatisticSty2Grid(options);
                statisticSty2Grid.run();

                console.log('grid run');
            }

            //统计Sty2列表
            var run = function() {
                Ancestor.Config.EPG_AUTH.list='/statisticSty2/list';
                statisticSty2GridRun({});
            }

            return {
                run:run,
                getStatisticSty2Grid:getStatisticSty2Grid
            }
        })();
    }
)